<div class="" id="myModal">
    <div class="modal-header">
        <h3 style="text-transform: capitalize;">Real</h3>
    </div>
</div>
<div style="margin: 5px 0">
    <a href="/admin/real/create" class="btn btn-primary btn-large" >Add new Real</a>
</div>
<table class="table table-bordered table-striped" id="customer">
    <tbody>
    <tr>
        <th>#</th>
        <th>Name</th>
        <th>Address</th>
        <th>Tel</th>
        <th>Mobile</th>
        <th>Email</th>
        <th>Fax</th>
        <th>Type</th>
        <th>Logo</th>

        <th>Contact</th>
        <th>Website</th>
        <th>Action</th>
    </tr>
    <?php

    if ($this->Customers):
        foreach ($this->Customers as $customer):

            ?>
        <tr id='<?php echo $customer['CustomerID']; ?>-customer'>
            <td><?php echo $customer['CustomerID'] ?></td>
            <td><?php echo $customer['CustomerName'] ?></td>
            <td><?php echo $customer['Address'] ?></td>
            <td><?php echo $customer['Tel'] ?></td>
            <td><?php echo $customer['Mobile'] ?></td>
            <td><?php echo $customer['Email'] ?></td>
            <td><?php echo $customer['Fax'] ?></td>
            <td><?php echo $customer['CustometType'] ?></td>
            <td><?php echo $customer['Logo'] ?></td>
            <td><?php echo $customer['Contact'] ?></td>
            <td><?php echo $customer['Website'] ?></td>
            <td>
                <a href='#myModal3' role="button" data-params='<?php echo json_encode($customer); ?>' class="update btn btn-primary">Edit</a>
                <a role="button" class="btn delete">Delete</a>
            </td>
        </tr>
            <?php
        endforeach;
    endif;
    ?>
    </tbody>
</table>
<div class="pagination pagination-centered">
    <ul>
        <?php

        if ($this->pages) {
            for ($i = 1; $i <= $this->pages; $i++) {
                echo '<li><a href="/admin/customer/index/page/' . $i . '">' . $i . '</a></li>';
            }
        }
        ?>
    </ul>
</div>
<div id="myModal3" class="modal hide fade" aria-labelledby="myModalLabel" aria-hidden="true" role="dialog">
    <form method="post" action="/admin/customer/update" id="formUpdateCustomer">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">Update Sale Category</h3>
        </div>

        <div class="modal-body">

            <table width="100%">
                <tr>
                    <td width="50%"> <label>Customer Name</label>
                        <input type="text" name="CustomerName" id="CustomerName" placeholder="Customer Name…">
                        <label>Address</label>
                        <input type="text" name="Address" id="Address" class="" placeholder="Address...">
                        <label>Tel</label>
                        <input type="text" name="Tel" id="Tel" class="" placeholder="Tel...">
                        <label>Mobile</label>
                        <input type="text" name="Mobile" id="Mobile" class="" placeholder="Mobile...">
                        <label>Email</label>
                        <input type="text" name="Email" id="Email" class="" placeholder="Email...">
                    </td>
                    <td width="50%"><label>Fax</label>
                        <input type="text" name="Fax" id="Fax" class="" placeholder="Fax...">
                        <label>CustomerType</label>
                        <select id="CustomerType" name="CustomerType">
                            <option value="1">Cá Nhân</option>
                            <option value="2">Công Ty</option>
                        </select>
                        <label>Logo</label>
                        <input type="file" name="file_upload" id="file_upload" />
                        <a href="javascript:$('#file_upload').uploadify('upload')">Upload Files</a>
                        <input id="logo" type="hidden" name="logo">
                        <label>Contact</label>
                        <input type="text" name="Contact" id="Contact" class="" placeholder="Contact...">
                        <label>Website</label>
                        <input type="text" name="Website" id="Website" class="" placeholder="Website...">
                        <input type="hidden" name="customerid" id="customerid">
                    </td>
                </tr>

            </table>

        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
            <button class="btn btn-primary" type="submit">Save changes</button>
        </div>
    </form>
</div>

<div id="myModal2" class="modal hide fade" aria-labelledby="myModalLabel" aria-hidden="true" role="dialog">
    <form method="post" action="/admin/customer/create" id="formCreateCustomer">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">Add customer</h3>
        </div>

        <div class="modal-body">
            <table width="100%">
                <tr>
                    <td width="50%"> <label>Customer Name</label>
                        <input type="text" name="CustomerName" id="CustomerName" placeholder="Customer Name…">
                        <label>Address</label>
                        <input type="text" name="Address" id="Address" class="" placeholder="Address...">
                        <label>Tel</label>
                        <input type="text" name="Tel" id="Tel" class="" placeholder="Tel...">
                        <label>Mobile</label>
                        <input type="text" name="Mobile" id="Mobile" class="" placeholder="Mobile...">
                        <label>Email</label>
                        <input type="text" name="Email" id="Email" class="" placeholder="Email...">
                    </td>
                    <td width="50%"><label>Fax</label>
                        <input type="text" name="Fax" id="Fax" class="" placeholder="Fax...">
                        <label>CustomerType</label>
                        <select id="CustomerType" name="CustomerType">
                            <option value="1">Cá Nhân</option>
                            <option value="2">Công Ty</option>
                        </select>
                        <label>Logo</label>
                        <input type="file" name="file_upload" id="file_upload" />
                        <a href="javascript:$('#file_upload').uploadify('upload')">Upload Files</a>
                        <input id="logo" type="hidden" name="logo">
                        <label>Contact</label>
                        <input type="text" name="Contact" id="Contact" class="" placeholder="Contact...">
                        <label>Website</label>
                        <input type="text" name="Website" id="Website" class="" placeholder="Website...">
                    </td>
                </tr>

            </table>

        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
            <button class="btn btn-primary" type="submit">Save changes</button>
        </div>
    </form>

</div>